<template>
  <div>
    <a-tabs v-model:activeKey="activeKey">
      <a-tab-pane
        key="1"
        tab="项目软件列表">
        <SoftList ref="softTable" :projectId="projectId"/>
      </a-tab-pane>
      <a-tab-pane key="2" tab="项目分类">
        <SoftProject @handle-project-soft="handleProjectSoft"/>
      </a-tab-pane>
    </a-tabs>
  </div>
</template>

<script>
import SoftList from './SoftList/SoftList'
import SoftProject from './SoftProject'
import { ref } from 'vue'
export default {
  components: {
    SoftList,
    SoftProject
  },
  setup () {
    const activeKey = ref('1')
    // eslint-disable-next-line prefer-const
    let projectId = ref('')
    const softTable = ref()
    const handleProjectSoft = (softProjectId) => {
      projectId.value = softProjectId
      activeKey.value = '1'
    }
    return {
      activeKey,
      projectId,
      handleProjectSoft,
      softTable
    }
  }
}
</script>

<style lang='less' scoped>

</style>
